

package cn.shengchao.examstar.rpc.distribute.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: examstarapi
 * @description: 订单分销任务的状态
 * @author: Xiong weiqiang
 * @create: 2025-03-25 10:22
 */
@Getter
@AllArgsConstructor
public enum DistributeOrderTaskStatusDataStatusEnum {
    STATUS_CREATE(0, "未分配"), STATUS_INASGN(1, "分配中"), STATUS_ASGNED(2, "已分配"), STATUS_BLCED(3, "已结算"),
    STATUS_ERROR(4, "分配错误"), STATUS_CANCEL(9, "退款"),;

    private final int status;
    private final String description;

    public static DistributeOrderTaskStatusDataStatusEnum getByStatus(int status) {
        for (DistributeOrderTaskStatusDataStatusEnum distributeDataStatusEnum : DistributeOrderTaskStatusDataStatusEnum
            .values()) {
            if (distributeDataStatusEnum.getStatus() == status) {
                return distributeDataStatusEnum;
            }
        }
        return null;
    }
}